﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TinyCinema;

namespace CustomerUI
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {        
        public static TinyCinema.Bussiness.Customer.Customer customer = new TinyCinema.Bussiness.Customer.Customer();
        public static TinyCinema.Bussiness.Schedule.Schedule schedule = new TinyCinema.Bussiness.Schedule.Schedule();
        public MainWindow()
        {            
            InitializeComponent();           
            pagContentFrameSource = pageMainUI;
            Login.Customer.Messenger.Register<TinyCinema.Bussiness.Login.Message.LogOutConfirmation>(this, (s) =>
            {
                blurEffect.Radius = 10;
                s.Result = MessageBoxUtils.WPFMessageBox.Show((App.Current.FindResource("langMsgRUSure") as String), "", MessageBoxButton.YesNo);
                blurEffect.Radius = 0;
            });  
        }
        public static DependencyProperty ContentFrameSourceProperty = DependencyProperty.Register("pagContentFrameSource", typeof(Page), typeof(MainWindow));
        public Page pagContentFrameSource
        {
            get { return (Page)GetValue(ContentFrameSourceProperty); }
            set { SetValue(ContentFrameSourceProperty, value); }
        }
        
        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {                          
            DragMove();
        }
        public static MainUI pageMainUI = new MainUI();
        public static DetailUI pageDetailUI = new DetailUI();        
    }
}
